package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.IndustrynewsMapper;
import com.education.wisdom.pojo.Industrynews;
import com.education.wisdom.service.IIndustrynewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 行业资讯列 服务层实现
 * 
 * @author ruoyi
 * @date 2018-10-24
 */
@Service
public class IndustrynewsServiceImpl implements IIndustrynewsService
{
	@Autowired
	private IndustrynewsMapper industrynewsMapper;

	/**
     * 查询行业资讯列信息
     * 
     * @param newsCode 行业资讯列ID
     * @return 行业资讯列信息
     */
    @Override
	public Industrynews selectIndustrynewsById(String newsCode)
	{
	    return industrynewsMapper.selectIndustrynewsById(newsCode);
	}
	
	/**
     * 查询行业资讯列列表
     * 
     * @param industrynews 行业资讯列信息
     * @return 行业资讯列集合
     */
	@Override
	public List<Industrynews> selectIndustrynewsList(Industrynews industrynews)
	{
	    return industrynewsMapper.selectIndustrynewsList(industrynews);
	}
	
    /**
     * 新增行业资讯列
     * 
     * @param industrynews 行业资讯列信息
     * @return 结果
     */
	@Override
	public int insertIndustrynews(Industrynews industrynews)
	{
	    return industrynewsMapper.insertIndustrynews(industrynews);
	}
	
	/**
     * 修改行业资讯列
     * 
     * @param industrynews 行业资讯列信息
     * @return 结果
     */
	@Override
	public int updateIndustrynews(Industrynews industrynews)
	{
	    return industrynewsMapper.updateIndustrynews(industrynews);
	}

	/**
     * 删除行业资讯列对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteIndustrynewsByIds(String ids)
	{
		return industrynewsMapper.deleteIndustrynewsByIds(Convert.toStrArray(ids));
	}
	
}
